using Cysharp.Threading.Tasks;
using IQIGame.Onigao.Framework;
using IQIGame.Onigao.Game;
using UnityEngine.Timeline;

namespace IQIGame.Onigao.GamePlay
{
    public class GamePermanentResMgr : Singleton<GamePermanentResMgr>
    {
        public ResLoader _resLoader;

        public TimelineAsset commonVFXAsset;

        private GamePermanentResMgr() { }

        public void Init(ResLoader loader)
        {
            _resLoader = loader;
        }

        public async UniTask Load()
        {
            commonVFXAsset = await _resLoader.LoadABAssetAwait<TimelineAsset>(PathConstant.commonVFXAssetPath);
            EntityDriver.commonTimeline = commonVFXAsset;
        }
    }
}
